<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> 
<jsp:include  page="../common/file.jsp"/>
<html>
<head>
</head>
<body class="dialog_body">
<div class="dialog-four-div">
	<div class="dialog-title">
		<i class="fa fa-minus-square"></i>用户基本信息
	</div>
	<table class="dialog-four-table">
		<tr>
			<td class="dialog-td-right">用户账号</td>
			<td class="dialog-td-left">
				<input type="text" value="${user.account}" readonly="readonly" class="input-readonly"/>
			</td>
			<td class="dialog-td-img" colspan="2" rowspan="5">
				<div class="iamge-pre">
					<c:if test="${user.path != '' && user.path != null }">
						<fmt:bundle basename="spring.config">  
							<img style="width:150px;height:170px;" class="showImg" src="<fmt:message key='http.image.url' /><c:out value='${user.path}'/>">
						</fmt:bundle>
					</c:if>
				</div>
			</td>
		</tr>
		<tr>
			<td class="dialog-td-right">用户密码</td>
			<td class="dialog-td-left">
				<c:if test="${sessionScope.username == '超级管理员'}">
					<input type="text" value="${user.password }" readonly="readonly" class="input-readonly"/>
				</c:if>
			</td>
		</tr>
		<tr>
			<td class="dialog-td-right">手机号码</td>
			<td class="dialog-td-left">
				<input type="text" value="${user.mobileNo}" readonly="readonly" class="input-readonly">
			</td>
		</tr>
		<tr>
			<td class="dialog-td-right">所属单位</td>
			<td class="dialog-td-left">
				<select class="select" id="organId" name="organId" style="width: 200px; height: 30px; border:0">
			</td>
		</tr>
		<tr>
			<td class="dialog-td-right">所属角色</td>
			<td class="dialog-td-left">
				<select class="select" id="roleId" name="roleId" style="width: 200px; height: 30px; border:0">
			</td>
		</tr>
		<tr>
			<td class="dialog-td-right">用户状态</td>
			<td class="dialog-td-left">
				<c:choose>
					<c:when test="${user.status == 1}">
						<input type="text" value="有效" readonly="readonly" class="input-readonly">
					</c:when><c:otherwise>
						<input type="text" value="无效" readonly="readonly" class="input-readonly">
					</c:otherwise>
				</c:choose>
			</td>
			<td colspan="2" style="text-align:center">图片</td>
		</tr>
	</table>
</div>
<script type="text/javascript">
	//下拉菜单树(所属单位)
	var ctxt = "${pageContext.request.contextPath}";
	$('#organId').combotree({
	    url : ctxt+'/organ/findAllTrees',
	    parentField : 'pid',
	    lines : true,
	    panelHeight : 'auto',
	    value: '${user.organId}',
	    disabled: true
	});
	
	//下拉菜单树(所属角色)
	var ctxt = "${pageContext.request.contextPath}";
	$('#roleId').combotree({
	    url : ctxt+'/role/findAllTree',
	    multiple: true,
	    panelHeight : 'auto',
	    value: '${roleIds}',
	    disabled: true
	});
</script>
</body>
</html>